1 <?php
2 include(
"header.php");
3 include(
"sidebar.php");
4 include(
"dbconnection.php");
5 if
($_GET[sstatus] == "All")
6 {
7 $result= mysql_query(
"select * from service");
8 }

9 else
if ($_GET[sstatus] == "Completed")
10 {
11     $result= mysql_query(
"select * from service where status='Completed'");
12 }

13 else

14 {
15     $result= mysql_query(
"select * from service where status='Pending'");
16 }
17 ?>
18
19
20         <div id=
"main">
21
22             <a name=
"TemplateInfo"></a>
23             <h1>Vehicle Service</h1>
24             <?php

25 if
($ctins == 1)
26 {
27     echo
"<center><b>Employees account created successfully...</b></center><br>";
28     echo
"<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
29 }

30 else

31 {
32     ?>
33             <strong> <a href=
"viewservice.php?sstatus=Pending">Pending</a>
34             | <a href=
"viewservice.php?sstatus=Completed">Completed</a>
35              | <a href=
"viewservice.php?sstatus=All">All</a></strong>
36 <form id=
"form1" name="form1" method="post" action="">
37 <table width=
"799" border="1">
38             <tr>
39               <th width=
"67" scope="col">Service<br />
40 ID</th>
41               <th width=
"147" scope="col">Customer</th>
42               <th width=
"127" scope="col">Vehicle name</th>
43               <th width=
"97" scope="col">Date</th>
44               <th width=
"159" scope="col">Address</th>
45         <th width=
"162" scope="col">Action</th>
46             </tr>
47           <?php
48           
while($arrrec= mysql_fetch_array($result))
49           {
50 $result1= mysql_query(
"select * from customer where custid='$arrrec[custid]'");
51 $arrrec1= mysql_fetch_array($result1);
52            echo
" <tr>
53               <td>&nbsp; $arrrec[serviecid]</td>"
;
54             echo
"<td><strong>$arrrec1[fname] $arrrec1[lname]</strong><br>
55             Contact No. $arrrec1[contactno1]
56             </td>
57               <td>&nbsp; $arrrec[vehiclename]</td>
58               <td>&nbsp; $arrrec[date]</td>
59               <td>&nbsp; $arrrec[address]
60                     <br>&nbsp; City: $arrrec[city]
61                     <br>&nbsp; landmark: $arrrec[landmark]
62                     <br>&nbsp; PIN: $arrrec[zipcode]</td>
63               <td>&nbsp; <a href='viewservicemore.php?vserviceid=$arrrec[serviecid]'>More</a> | "
;
64               
if($arrrec[status] == "Completed")
65               {
66                   echo
"Completed";
67               }
68                
else if($arrrec[status] == "Cancelled")
69               {
70                   echo
"Cancelled";
71               }
72               
else
73               {
74 echo
"<a href='viewservicebilling.php?vserviceid=$arrrec[serviecid]'>Billing</a>";
75               }
76          echo
"</td> </tr>";
77           }
78           ?>
79           </table>
80         </form>
81     <?php
82     }
83     ?>
84             <p>&nbsp;</p>
85 <br />
86
87         </div>
88
89 <!-- wrap ends here -->
90 </div>
91
92 <?php
93 include(
"footer.php");
94 ?>


Gõ tìm kiếm nhanh...